using System.IO.Compression;

namespace CSharpePro._0923;

public class Demo1
{
 //判断闰年
 
 public void TestPrint1()
 {
  Console.WriteLine("请输入年份：");
  
  int year=Convert.ToInt32(Console.ReadLine());
 
  
   if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0)
   {
    Console.WriteLine("该年份为闰年！");
    
   }
   else
   {
    Console.WriteLine("该年份不是闰年！");
   }
  
 }
 //旅游价格计算
 public void TestPrint2()
 {
  double price = 8800;
  Console.WriteLine("请输入出行月份：");
  int month = Convert.ToInt32(Console.ReadLine());
  Console.WriteLine("请选择出行方式：    1.航班出行 2.动车出行");
  int num = Convert.ToInt32(Console.ReadLine());
  
  if (month >= 5 && month <= 10)
  {
   switch (num)
   {
      case 1: price = price * 0.9;
       break;
      case 2: price = price * 0.75;
       break;
   }
  }
  else
  {
   switch (num)
   {
    case 1:
     price = price * 0.6;
     break;
    case 2:
     price = price * 0.3;
     break;
     ;
   }
  }


  Console.WriteLine($"您本次出行价格为：{price}元");
 }

}